package com.zyj.springboothapim.controller;

import com.zyj.springboothapim.bean.Room;

import com.zyj.springboothapim.bean.User;
import com.zyj.springboothapim.service.AdminService;
import com.zyj.springboothapim.service.RoomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
//这个是默认json接收和发送@RestController
@RequestMapping("/Room")
public class RoomController {

    RoomService roomService;

    @Autowired
    public void setRoomService(RoomService roomService)
    {
        this.roomService = roomService;
    }


    //查询所有用户
    @RequestMapping(value = "/selectRoom" ,method = {RequestMethod.POST,RequestMethod.GET})
    @ResponseBody
    public List<Room> selectRoom(){
        System.out.println("/Room/selectRoom");
        return roomService.selectRoom();
    }




}
